<!DOCTYPE html>
<html lang=zh>
<head><meta name="generator" content="Hexo 3.9.0">
    <!-- so meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="HandheldFriendly" content="True">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="description" content="前言手机浏览器打开 App 是个很常见的需求，比如在一些推广活动中将用户从 H5 页面导向到 App 里。个人觉得难点如下：  如何判断用户处在手机浏览器中当然如果页面是 H5 的推广页就不存在这个问题了，我说的放在 App 里的产品页。 如何调起 App基本都是使用 schema 协议，这个后续会讲到。 如何判断是否安装了 App这个就比较棘手了，理论上来讲 H5 是没法判断的，只能通过一些类似">
<meta name="keywords" content="同花顺">
<meta property="og:type" content="article">
<meta property="og:title" content="手机浏览器如何打开APP">
<meta property="og:url" content="https://andyliwr.github.io/2018/10/30/brower_open_application/index.html">
<meta property="og:site_name" content="月光倾城的代码小屋">
<meta property="og:description" content="前言手机浏览器打开 App 是个很常见的需求，比如在一些推广活动中将用户从 H5 页面导向到 App 里。个人觉得难点如下：  如何判断用户处在手机浏览器中当然如果页面是 H5 的推广页就不存在这个问题了，我说的放在 App 里的产品页。 如何调起 App基本都是使用 schema 协议，这个后续会讲到。 如何判断是否安装了 App这个就比较棘手了，理论上来讲 H5 是没法判断的，只能通过一些类似">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2020-01-15T06:30:09.116Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="手机浏览器如何打开APP">
<meta name="twitter:description" content="前言手机浏览器打开 App 是个很常见的需求，比如在一些推广活动中将用户从 H5 页面导向到 App 里。个人觉得难点如下：  如何判断用户处在手机浏览器中当然如果页面是 H5 的推广页就不存在这个问题了，我说的放在 App 里的产品页。 如何调起 App基本都是使用 schema 协议，这个后续会讲到。 如何判断是否安装了 App这个就比较棘手了，理论上来讲 H5 是没法判断的，只能通过一些类似">
    
    
        
          
              <link rel="shortcut icon" href="/images/favicon.ico">
          
        
        
          
            <link rel="icon" type="image/png" href="/images/favicon-192x192.png" sizes="192x192">
          
        
        
          
            <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
          
        
    
    <!-- title -->
    <title>手机浏览器如何打开APP</title>
    <!-- styles -->
    <link rel="stylesheet" href="/css/style.css">
    <!-- persian styles -->
    
      <link rel="stylesheet" href="/css/rtl.css">
    
    <!-- rss -->
    
    
</head>

<body class="max-width mx-auto px3 ltr">
    
      <div id="header-post">
  <a id="menu-icon" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="menu-icon-tablet" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="top-icon-tablet" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');" style="display:none;"><i class="fas fa-chevron-up fa-lg"></i></a>
  <span id="menu">
    <span id="nav">
      <ul>
         
          <li><a href="/">首页</a></li>
         
          <li><a href="/archives/">归档</a></li>
         
          <li><a href="/search/">搜索</a></li>
         
          <li><a href="/tags/">标签</a></li>
         
          <li><a href="/others/">其他文章</a></li>
        
      </ul>
    </span>
    <br/>
    <span id="actions">
      <ul>
        
        <li><a class="icon" href="/2018/11/06/zepto_slideup_slidedown/"><i class="fas fa-chevron-left" aria-hidden="true" onmouseover="$('#i-prev').toggle();" onmouseout="$('#i-prev').toggle();"></i></a></li>
        
        
        <li><a class="icon" href="/2018/10/29/ubuntu_clean_cache/"><i class="fas fa-chevron-right" aria-hidden="true" onmouseover="$('#i-next').toggle();" onmouseout="$('#i-next').toggle();"></i></a></li>
        
        <li><a class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up" aria-hidden="true" onmouseover="$('#i-top').toggle();" onmouseout="$('#i-top').toggle();"></i></a></li>
        <li><a class="icon" href="#"><i class="fas fa-share-alt" aria-hidden="true" onmouseover="$('#i-share').toggle();" onmouseout="$('#i-share').toggle();" onclick="$('#share').toggle();return false;"></i></a></li>
      </ul>
      <span id="i-prev" class="info" style="display:none;">上一篇</span>
      <span id="i-next" class="info" style="display:none;">下一篇</span>
      <span id="i-top" class="info" style="display:none;">返回顶部</span>
      <span id="i-share" class="info" style="display:none;">分享文章</span>
    </span>
    <br/>
    <div id="share" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=https://andyliwr.github.io/2018/10/30/brower_open_application/"><i class="fab fa-facebook " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&text=手机浏览器如何打开APP"><i class="fab fa-twitter " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-linkedin " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&is_video=false&description=手机浏览器如何打开APP"><i class="fab fa-pinterest " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=手机浏览器如何打开APP&body=Check out this article: https://andyliwr.github.io/2018/10/30/brower_open_application/"><i class="fas fa-envelope " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-get-pocket " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-reddit " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-stumbleupon " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-digg " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&name=手机浏览器如何打开APP&description="><i class="fab fa-tumblr " aria-hidden="true"></i></a></li>
</ul>

    </div>
    <div id="toc">
      <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#前言"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#解决问题"><span class="toc-number">2.</span> <span class="toc-text">解决问题</span></a></li></ol>
    </div>
  </span>
</div>

    
    <div class="content index py4">
        
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  <header>
    
    <h1 class="posttitle" itemprop="name headline">
        手机浏览器如何打开APP
    </h1>



    <div class="meta">
      <span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">月光倾城的代码小屋</span>
      </span>
      
    <div class="postdate">
        <time datetime="2018-10-30T10:48:23.000Z" itemprop="datePublished">2018-10-30</time>
    </div>


      

      
    <div class="article-tag">
        <i class="fas fa-tag"></i>
        <a class="tag-link" href="/tags/同花顺/">同花顺</a>
    </div>


    </div>
  </header>
  

  <div class="content" itemprop="articleBody">
    <h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>手机浏览器打开 <code>App</code> 是个很常见的需求，比如在一些推广活动中将用户从 <code>H5</code> 页面导向到 <code>App</code> 里。个人觉得难点如下：</p>
<ol>
<li>如何判断用户处在手机浏览器中<br>当然如果页面是 <code>H5</code> 的推广页就不存在这个问题了，我说的放在 App 里的产品页。</li>
<li>如何调起 <code>App</code><br>基本都是使用 <code>schema</code> 协议，这个后续会讲到。</li>
<li>如何判断是否安装了 <code>App</code><br>这个就比较棘手了，理论上来讲 <code>H5</code> 是没法判断的，只能通过一些类似 Hack 的技巧去弥补。</li>
</ol>
<h3 id="解决问题"><a href="#解决问题" class="headerlink" title="解决问题"></a>解决问题</h3><ol>
<li><p><strong>判断用户是否处在手机浏览器中</strong><br><code>Zepto</code> 有一个附加模块– <code>detect.js</code>（源码请参考<a href="https://github.com/madrobby/zepto/blob/master/src/detect.js#files" target="_blank" rel="noopener">官方 github</a>），这个 JS 代码也很简单，就是使用正则表达式对 UA 头进行匹配。<br>借鉴此模块的代码我们可以总结出一套判断是否处于手机浏览器的方法，需要满足的条件如下：</p>
<ol>
<li>UA 头能匹配到 <code>Andriod</code>、<code>iPhone</code>、<code>iPad</code>、或者很少见的 <code>SymbianOS</code> 以及 <code>Windows Phone</code></li>
<li>当前不是在 <code>App</code> 的 <code>webview</code> 中打开</li>
</ol>
<p>因此判断是否在手机浏览器中的代码可以这么写：</p>
</li>
</ol>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断是否在手机浏览器中</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@returns <span class="type">&#123;Boolean&#125;</span> </span>true表示当前在手机浏览器中，false表示当前不在手机浏览器中</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">judgeIsInH5Broswer</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">  <span class="keyword">let</span> ua = navigator.userAgent</span><br><span class="line">  <span class="keyword">let</span> isWindowsPhone = <span class="regexp">/(?:Windows Phone)/</span>.test(ua)</span><br><span class="line">  <span class="keyword">let</span> isSymbian = <span class="regexp">/(?:SymbianOS)/</span>.test(ua) || isWindowsPhone</span><br><span class="line">  <span class="keyword">let</span> isAndroid = <span class="regexp">/(?:Android)/</span>.test(ua)</span><br><span class="line">  <span class="keyword">let</span> isFireFox = <span class="regexp">/(?:Firefox)/</span>.test(ua)</span><br><span class="line">  <span class="keyword">let</span> isTablet = <span class="regexp">/(?:iPad|PlayBook)/</span>.test(ua) || (isAndroid &amp;&amp; !<span class="regexp">/(?:Mobile)/</span>.test(ua)) || (isFireFox &amp;&amp; <span class="regexp">/(?:Tablet)/</span>.test(ua))</span><br><span class="line">  <span class="keyword">let</span> isPhone = <span class="regexp">/(?:iPhone)/</span>.test(ua) &amp;&amp; !isTablet</span><br><span class="line">  <span class="keyword">let</span> isInHexin = getAppVersion()</span><br><span class="line">  <span class="keyword">return</span> (isSymbian || isAndroid || isPhone) &amp;&amp; !isInHexin</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>PS</strong>: 在同花顺 App 中可以通过 <code>getAppVersion</code> 来获取 App 版本，如果当前不在 App 中 getAppVersion 返回 <code>false</code></p>
<ol start="2">
<li><p><strong>浏览器唤起 App</strong><br>浏览器唤起 App 是通过 App 配置的 Schema 协议，它的格式如下：<br><code>[scheme]://[host]/[path]?[query]</code><br>参数说明如下：</p>
</li>
<li><p><strong>scheme</strong>: 判别启动的 App</p>
</li>
<li><strong>host</strong>: 选填值，可以为空，例如：localhost:8080</li>
<li><strong>path</strong>: 选填值</li>
<li><strong>query</strong>: 选填值，参数</li>
</ol>
<p>例如打开微信可以使用 <code>weixin://</code>。<br>经过和我司客户端开发的反复沟通，我最终拿到了打开 App 并跳转指定 H5 页面的协议，代码如下：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> element = $(<span class="string">'&lt;a&gt;&lt;/a&gt;'</span>)</span><br><span class="line">element.attr(<span class="string">'href'</span>, <span class="string">'amihexin://command=gotopage&amp;pageid=2804&amp;url='</span> + <span class="built_in">encodeURIComponent</span>(url) + <span class="string">'&amp;title=同花顺保险'</span>)</span><br><span class="line">element.trigger(<span class="string">'click'</span>)</span><br></pre></td></tr></table></figure>
<ol start="3">
<li><p><strong>如何判断是否安装了 App</strong><br>JS 是无法判断手机是否安装了某款 App 的，只能判断如果长时间没有打开 App，就跳转到 App 下载页。<br>这里介绍一个页面可见性 API–<code>document.hidden</code></p>
<blockquote>
<p><code>document.hidden</code> 可以用来检测页面对于用户的可见性，即返回用户当前浏览的页面或标签 <code>tap</code> 的状态变化。 在最小化浏览器、切换 <code>tap</code> 页面时生效.(如需对 <code>app</code> 中几个 <code>webview</code> 进行切换操作时，可使用 <code>pageVisibility</code> 接口进行相应的事件监听和处理<br><code>document.hidden</code> 该值表示 page 是否是可见的,值为 boolean 值<br><code>document.visibilityState</code>可能有三个值，<code>visible</code>（表示该 page 是处于最前面的页面并且不是处于一个最小化的窗口），<code>hidden</code>（表示该 page 不是处于最前面的页面或者是处于一个最小化的窗口），<code>prerender</code>（表示该页面内容正在重新渲染并且该页面对于用户是不可见的）</p>
</blockquote>
<p>这里我们就能使用这个 document.hidden 属性来判断点击打开 App 之后是否成功打开 App，如果在短时间内 document.hidden 的值从 true 变成了 false 证明成功打开了 App，如果超过一定时间 document.hidden 还是没有变成 false 则认为用户没有安装 App，于是就跳转 App 下载页面。具体代码如下：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 超时没有打开同花顺则认为当前用户没有安装同花顺App</span></span><br><span class="line"><span class="keyword">let</span> hidden = <span class="string">'hidden'</span>;</span><br><span class="line"><span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="built_in">document</span>.hidden !== <span class="string">"undefined"</span>) &#123;  </span><br><span class="line">  hidden = <span class="string">"hidden"</span>;  </span><br><span class="line">&#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="built_in">document</span>.mozHidden !== <span class="string">"undefined"</span>) &#123;  </span><br><span class="line">  hidden = <span class="string">"mozHidden"</span>;  </span><br><span class="line">&#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="built_in">document</span>.msHidden !== <span class="string">"undefined"</span>) &#123;  </span><br><span class="line">  hidden = <span class="string">"msHidden"</span>;  </span><br><span class="line">&#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="built_in">document</span>.webkitHidden !== <span class="string">"undefined"</span>) &#123;  </span><br><span class="line">  hidden = <span class="string">"webkitHidden"</span>;  </span><br><span class="line">&#125;  </span><br><span class="line">setTimeout(<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">  <span class="keyword">if</span> (!<span class="built_in">window</span>.document[hidden]) &#123;</span><br><span class="line">    setTimeout(<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">      <span class="keyword">if</span> (+<span class="keyword">new</span> <span class="built_in">Date</span>() - clickedAt &lt; <span class="number">2000</span>) &#123;</span><br><span class="line">        <span class="keyword">if</span> (getPlatform() === <span class="string">'gphone'</span>) &#123;</span><br><span class="line">          <span class="built_in">window</span>.location.href = <span class="string">'https://a.app.qq.com/o/simple.jsp?pkgname=com.hexin.plat.android'</span></span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">          <span class="built_in">window</span>.location.href = <span class="string">'https://itunes.apple.com/cn/app/tong-hua-shun-chao-gu-gu-piao/id303191318?mt=8'</span></span><br><span class="line">        &#125;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;, <span class="number">500</span>)</span><br><span class="line">  &#125;</span><br><span class="line">&#125;, <span class="number">500</span>)</span><br></pre></td></tr></table></figure>
</li>
</ol>

  </div>
  <div class="statement">
    <hr>  
    1. 如果本文帮到了您，不妨点一下右上角的”<i class="fas fa-share-alt"></i>“按钮。<br>
    2. 除非注明，本博文章均为原创，转载请以链接形式标明本文地址。<br>
    3. 如果你有任何疑问，欢迎发送邮件到我的邮箱<a href="mailto:andyliwr@outlook.com">andyliwr@outlook.com<br>
  </div>
</article>


    <div class="blog-post-comments">
        <div id="gitalk_thread">
            <noscript>加载评论需要在浏览器启用 JavaScript 脚本支持。</noscript>
        </div>
    </div>



        
          <div id="footer-post-container">
  <div id="footer-post">

    <div id="nav-footer" style="display: none">
      <ul>
         
          <li><a href="/">首页</a></li>
         
          <li><a href="/archives/">归档</a></li>
         
          <li><a href="/search/">搜索</a></li>
         
          <li><a href="/tags/">标签</a></li>
         
          <li><a href="/others/">其他文章</a></li>
        
      </ul>
    </div>

    <div id="toc-footer" style="display: none">
      <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#前言"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#解决问题"><span class="toc-number">2.</span> <span class="toc-text">解决问题</span></a></li></ol>
    </div>

    <div id="share-footer" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=https://andyliwr.github.io/2018/10/30/brower_open_application/"><i class="fab fa-facebook fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&text=手机浏览器如何打开APP"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&is_video=false&description=手机浏览器如何打开APP"><i class="fab fa-pinterest fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=手机浏览器如何打开APP&body=Check out this article: https://andyliwr.github.io/2018/10/30/brower_open_application/"><i class="fas fa-envelope fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-get-pocket fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-reddit fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-stumbleupon fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&title=手机浏览器如何打开APP"><i class="fab fa-digg fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=https://andyliwr.github.io/2018/10/30/brower_open_application/&name=手机浏览器如何打开APP&description="><i class="fab fa-tumblr fa-lg" aria-hidden="true"></i></a></li>
</ul>

    </div>

    <div id="actions-footer">
        <a id="menu" class="icon" href="#" onclick="$('#nav-footer').toggle();return false;"><i class="fas fa-bars fa-lg" aria-hidden="true"></i> 菜单</a>
        <a id="toc" class="icon" href="#" onclick="$('#toc-footer').toggle();return false;"><i class="fas fa-list fa-lg" aria-hidden="true"></i> 目录</a>
        <a id="share" class="icon" href="#" onclick="$('#share-footer').toggle();return false;"><i class="fas fa-share-alt fa-lg" aria-hidden="true"></i> 分享</a>
        <a id="top" style="display:none" class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up fa-lg" aria-hidden="true"></i> 返回顶部</a>
    </div>

  </div>
</div>

        
        <footer id="footer">
  <div class="footer-left">
    Copyright &copy; 2020 Dikang Li
  </div>
  <div class="footer-right">
    <nav>
      <ul>
         
          <li><a href="/">首页</a></li>
         
          <li><a href="/archives/">归档</a></li>
         
          <li><a href="/search/">搜索</a></li>
         
          <li><a href="/tags/">标签</a></li>
         
          <li><a href="/others/">其他文章</a></li>
        
      </ul>
    </nav>
  </div>
</footer>

    </div>
</body>
</html>
<!-- styles -->
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<link rel="stylesheet" href="/lib/justified-gallery/css/justifiedGallery.min.css">
<link rel="stylesheet" href="/lib/fancybox/jquery.fancybox.css">

<link rel="stylesheet" href="https://file.lantingshucheng.com/blog/v3/static/styles/gitalk.css">


<!-- jquery -->
<script src="/lib/jquery/jquery.min.js"></script>
<script src="/lib/justified-gallery/js/jquery.justifiedGallery.min.js"></script>
<script src="/lib/fancybox/jquery.fancybox.pack.js"></script>

<script type="text/javascript" src="https://file.lantingshucheng.com/blog/v3/static/scripts/md5.js"></script>
<script type="text/javascript" src="https://file.lantingshucheng.com/blog/v3/static/scripts/gitalk.min.js"></script>

<script src="/js/main.js"></script>
<!-- search -->

<!-- Google Analytics -->

<!-- Baidu Analytics -->

    <script type="text/javascript">
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?7851ca7a86be957be994acb77639a5be";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>

<!-- Disqus Comments -->


  <script type="text/javascript">
    window.onload = function(){
      if (window.location.href.indexOf('andyliwr.github.io') > -1) {
        var gitalk = new Gitalk({
          clientID: 'ad6f70df0c70d2b715f9',
          clientSecret: '40384bee244c1e17dd7c37733d21e9ef669e969c',
          repo: 'Andyliwr.github.io',
          owner: 'Andyliwr',
          admin: ['Andyliwr'],
          id: md5(location.pathname),
          distractionFreeMode: 'true'
        })
        gitalk.render('gitalk_thread')
      }
    }
  </script>


